var autoIncrement = require('mongoose-auto-increment')
var mongoose = require('mongoose');
var schema = mongoose.Schema;

var TempToken = function(){
    var tempTokenSchema = new schema({
        token : { type: String, index: true, default: function(){return Math.random().toString(36).substr(2);} },
        expires : { type: Date, default: Date.now, expires: 60 * 5 },
        data : { type: Object }
    });
    return mongoose.model('TempToken',tempTokenSchema, 'TempToken');
};

module.exports = TempToken;
